package com.ynny.extends_.example04;

public class FruitTest {

    public static void main(String[] args) {
        Fruit fruit = new Apple();

        fruit.area = "昭通";
        fruit.name = "红富士";
        fruit.price = 10;
        System.out.println(fruit);

        Banana fruit2 = new Banana();
        fruit2.name = "芭蕉";
        fruit2.price = 8;

        System.out.println(fruit2);
    }
}
